<?php
class gregorian extends lb_calendar{

	/**
	 * Format a local time/date according to locale settings
	 *
	 * @author  Omid Mottaghi
	 * @access	public
	 * @param   string  Formatting string
	 * @param   int     Timestamp to format
	 * @return  string  Formatted local time/date according to locale settings
	 */
	public function strftime($format, $timestamp=''){
		return strftime($format, $timestamp);
	}

	/**
	 * Format a local time/date
	 *
	 * @author  Omid Mottaghi
	 * @access	public
	 * @param   string  Formatting string
	 * @param   int     Timestamp to format
	 * @return  string  Formatted local time/date
	 */
	public function date($format, $timestamp=''){
		return date($format, $timestamp);
	}

	/**
	 * Get Unix timestamp for a date
	 *
	 * @author	Omid Mottaghi
	 * @access	public
	 * @param   int hour
	 * @param   int minute
	 * @param   int second
	 * @param   int month
	 * @param   int day
	 * @param   int year
	 * @param   int is daylight savings time set?
	 * @return  int returned timestamp
	 */
	public function mktime($hour='', $minute='', $second='', $month='', $day='', $year='', $is_dst=-1){
		if ( (string) $hour	== '') { $hour	= self::date('H'); }
		if ( (string) $minute	== '') { $minute	= self::date('i'); }
		if ( (string) $second	== '') { $second	= self::date('s'); }
		if ( (string) $day	== '') { $day	= self::date('j'); }
		if ( (string) $month	== '') { $month	= self::date('n'); }
		if ( (string) $year	== '') { $year	= self::date('Y'); }
		
		return mktime($hour, $minute, $second, $month, $day, $year, $is_dst);
	}

}
?>
